3.46 \(\int \sec (c+d x) (a+i a \tan (c+d x))^3 \, dx\)

Optimal. Leaf size=99 \[ \frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {5 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d} \]

[Out]

5/2*a^3*arctanh(sin(d*x+c))/d+5/2*I*a^3*sec(d*x+c)/d+1/3*I*a*sec(d*x+c)*(a+I*a*tan(d*x+c))^2/d+5/6*I*sec(d*x+c
)*(a^3+I*a^3*tan(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3498, 3486, 3770} \[ \frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {5 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*(a + I*a*Tan[c + d*x])^3,x]

[Out]

(5*a^3*ArcTanh[Sin[c + d*x]])/(2*d) + (((5*I)/2)*a^3*Sec[c + d*x])/d + ((I/3)*a*Sec[c + d*x]*(a + I*a*Tan[c +
d*x])^2)/d + (((5*I)/6)*Sec[c + d*x]*(a^3 + I*a^3*Tan[c + d*x]))/d

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3498

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] + Dist[(a*(m + 2*n - 2))/(m + n - 1), Int[(
d*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] &&
 GtQ[n, 0] && NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \sec (c+d x) (a+i a \tan (c+d x))^3 \, dx &=\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {1}{3} (5 a) \int \sec (c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {1}{2} \left (5 a^2\right ) \int \sec (c+d x) (a+i a \tan (c+d x)) \, dx\\ &=\frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}+\frac {1}{2} \left (5 a^3\right ) \int \sec (c+d x) \, dx\\ &=\frac {5 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {5 i a^3 \sec (c+d x)}{2 d}+\frac {i a \sec (c+d x) (a+i a \tan (c+d x))^2}{3 d}+\frac {5 i \sec (c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.62, size = 93, normalized size = 0.94 \[ \frac {a^3 (\cos (3 d x)+i \sin (3 d x)) \left (60 \tanh ^{-1}\left (\cos (c) \tan \left (\frac {d x}{2}\right )+\sin (c)\right )+i \sec ^3(c+d x) (9 i \sin (2 (c+d x))+24 \cos (2 (c+d x))+20)\right )}{12 d (\cos (d x)+i \sin (d x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*(a + I*a*Tan[c + d*x])^3,x]

[Out]

(a^3*(Cos[3*d*x] + I*Sin[3*d*x])*(60*ArcTanh[Sin[c] + Cos[c]*Tan[(d*x)/2]] + I*Sec[c + d*x]^3*(20 + 24*Cos[2*(
c + d*x)] + (9*I)*Sin[2*(c + d*x)])))/(12*d*(Cos[d*x] + I*Sin[d*x])^3)

________________________________________________________________________________________

fricas [B]  time = 0.54, size = 202, normalized size = 2.04 \[ \frac {66 i \, a^{3} e^{\left (5 i \, d x + 5 i \, c\right )} + 80 i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} + 30 i \, a^{3} e^{\left (i \, d x + i \, c\right )} + 15 \, {\left (a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 15 \, {\left (a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{6 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

1/6*(66*I*a^3*e^(5*I*d*x + 5*I*c) + 80*I*a^3*e^(3*I*d*x + 3*I*c) + 30*I*a^3*e^(I*d*x + I*c) + 15*(a^3*e^(6*I*d
*x + 6*I*c) + 3*a^3*e^(4*I*d*x + 4*I*c) + 3*a^3*e^(2*I*d*x + 2*I*c) + a^3)*log(e^(I*d*x + I*c) + I) - 15*(a^3*
e^(6*I*d*x + 6*I*c) + 3*a^3*e^(4*I*d*x + 4*I*c) + 3*a^3*e^(2*I*d*x + 2*I*c) + a^3)*log(e^(I*d*x + I*c) - I))/(
d*e^(6*I*d*x + 6*I*c) + 3*d*e^(4*I*d*x + 4*I*c) + 3*d*e^(2*I*d*x + 2*I*c) + d)

________________________________________________________________________________________

giac [A]  time = 1.14, size = 125, normalized size = 1.26 \[ \frac {15 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 15 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) - \frac {2 \, {\left (9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 48 i \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 22 i \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+I*a*tan(d*x+c))^3,x, algorithm="giac")

[Out]

1/6*(15*a^3*log(tan(1/2*d*x + 1/2*c) + 1) - 15*a^3*log(tan(1/2*d*x + 1/2*c) - 1) - 2*(9*a^3*tan(1/2*d*x + 1/2*
c)^5 + 18*I*a^3*tan(1/2*d*x + 1/2*c)^4 - 48*I*a^3*tan(1/2*d*x + 1/2*c)^2 - 9*a^3*tan(1/2*d*x + 1/2*c) + 22*I*a
^3)/(tan(1/2*d*x + 1/2*c)^2 - 1)^3)/d

________________________________________________________________________________________

maple [A]  time = 0.27, size = 167, normalized size = 1.69 \[ -\frac {i a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{3 d \cos \left (d x +c \right )^{3}}+\frac {i a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{3 d \cos \left (d x +c \right )}+\frac {i a^{3} \left (\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3 d}+\frac {2 i a^{3} \cos \left (d x +c \right )}{3 d}-\frac {3 a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}-\frac {3 a^{3} \sin \left (d x +c \right )}{2 d}+\frac {5 a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {3 i a^{3}}{d \cos \left (d x +c \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a+I*a*tan(d*x+c))^3,x)

[Out]

-1/3*I/d*a^3*sin(d*x+c)^4/cos(d*x+c)^3+1/3*I/d*a^3*sin(d*x+c)^4/cos(d*x+c)+1/3*I/d*a^3*cos(d*x+c)*sin(d*x+c)^2
+2/3*I/d*a^3*cos(d*x+c)-3/2/d*a^3*sin(d*x+c)^3/cos(d*x+c)^2-3/2*a^3*sin(d*x+c)/d+5/2/d*a^3*ln(sec(d*x+c)+tan(d
*x+c))+3*I/d*a^3/cos(d*x+c)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 109, normalized size = 1.10 \[ \frac {9 \, a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} + \log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + \frac {36 i \, a^{3}}{\cos \left (d x + c\right )} + \frac {4 i \, {\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a^{3}}{\cos \left (d x + c\right )^{3}}}{12 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

1/12*(9*a^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) + log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 12*a^3*log
(sec(d*x + c) + tan(d*x + c)) + 36*I*a^3/cos(d*x + c) + 4*I*(3*cos(d*x + c)^2 - 1)*a^3/cos(d*x + c)^3)/d

________________________________________________________________________________________

mupad [B]  time = 5.23, size = 136, normalized size = 1.37 \[ \frac {5\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,6{}\mathrm {i}-a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,16{}\mathrm {i}-3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a^3\,22{}\mathrm {i}}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(c + d*x)*1i)^3/cos(c + d*x),x)

[Out]

(5*a^3*atanh(tan(c/2 + (d*x)/2)))/d - (a^3*tan(c/2 + (d*x)/2)^4*6i - a^3*tan(c/2 + (d*x)/2)^2*16i + 3*a^3*tan(
c/2 + (d*x)/2)^5 + (a^3*22i)/3 - 3*a^3*tan(c/2 + (d*x)/2))/(d*(3*tan(c/2 + (d*x)/2)^2 - 3*tan(c/2 + (d*x)/2)^4
 + tan(c/2 + (d*x)/2)^6 - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - i a^{3} \left (\int i \sec {\left (c + d x \right )}\, dx + \int \left (- 3 \tan {\left (c + d x \right )} \sec {\left (c + d x \right )}\right )\, dx + \int \tan ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \left (- 3 i \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\right )\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+I*a*tan(d*x+c))**3,x)

[Out]

-I*a**3*(Integral(I*sec(c + d*x), x) + Integral(-3*tan(c + d*x)*sec(c + d*x), x) + Integral(tan(c + d*x)**3*se
c(c + d*x), x) + Integral(-3*I*tan(c + d*x)**2*sec(c + d*x), x))

________________________________________________________________________________________